export default {
    param: [
        // 特殊类型，Primary 在初始化时，会传入对应参数，如果不传，默认从-1 开始递减，并且多个对象不重复
        { key: 'id2', label: '主键', type: 'Primary' },
        {
            key: 'antennaType', label: '天线方向图', type: 'Radio', default: 'round',
            Dict: [{ value: 'round', label: '圆形天线' }, { value: 'oval', label: '椭圆形天线' }, { value: '3Dgain', label: '3D增益表' }, { value: 'HVgain', label: 'H/V增益表' }]
        },
        { key: 'SolidLine', skipParam: true, label: '', type: 'SolidLine', },
        {
            key: 'DasheLine', skipParam: true, label: '', type: 'DasheLine',
            Event: {
                // 监听事件，改变当前值,一个字段对应一组监听程序
                // Wacth: 'antennaType== "round" ? SolidLine : null',
                // 显示隐藏事件（此项不编写时，默认为展示状态）
                Enable: 'antennaType == "round" || antennaType == "oval"',
            }
        },
        {
            key: 'equationType', label: '方程类型', allowClear: true, type: 'Select', default: 0,
            Dict: [{ value: 0, label: '标准方程' }, { value: 1, label: '自定义方程1' }, { value: 2, label: '自定义方程2' }],
            Event: {
                // 监听事件，改变当前值,一个字段对应一组监听程序
                // Wacth: 'antennaType== "round" ? equationType : null',
                // 显示隐藏事件（此项不编写时，默认为展示状态）
                Enable: 'antennaType == "round"',
            }
        },
        {
            key: 'equationName', label: '方程名称', allowClear: true, type: 'Select', default: 0,
            Dict: [{ value: 0, label: '名称1' }, { value: 1, label: '名称2' }, { value: 2, label: '名称3' }],
            Event: {
                // 监听事件，改变当前值,一个字段对应一组监听程序
                // Wacth: 'equationType',
                // 显示隐藏事件（此项不编写时，默认为展示状态）
                Enable: 'equationType == 0 && (antennaType == "round" || antennaType == "oval")',
            }
        },
        {
            key: 'equationFormula', label: '方程公式', allowClear: true, type: 'Select', default: 0,
            Dict: [{ value: 0, label: 'ABC' }, { value: 1, label: 'DFG' }, { value: 2, label: 'HJK' }],
            Event: {
                // 监听事件，改变当前值,一个字段对应一组监听程序
                // Wacth: 'equationType',
                // 显示隐藏事件（此项不编写时，默认为展示状态）
                Enable: 'equationType != 0 && (antennaType == "round" || antennaType == "oval")',
            }
        },
        {
            key: 'EditAntennaEquation', skipParam: true, type: 'Button', readonly: false,
            Event: {
                // 监听事件，改变当前值,一个字段对应一组监听程序
                // Wacth: 'equationType',
                // 显示隐藏事件（此项不编写时，默认为展示状态）
                // Enable: 'equationType == 0 && (antennaType == "round" || antennaType == "oval")',
                ParamOption: {
                    'equationType == 0': { text: '编辑/天线方程', EventName: 'ClickTest12' },
                    'equationType != 0': { text: '编辑天线方程', EventName: 'ClickTest' },
                },
            }
        },
        {
            key: 'AntennaModel', label: '天线型号', allowClear: true, type: 'Select', default: 0,
            Dict: [{ value: 0, label: '标准方程' }, { value: 1, label: '自定义方程1' }, { value: 2, label: '自定义方程2' }]
        },
        {
            key: 'Manufacturer', label: '生产厂家', allowClear: true, type: 'Select', default: 0,
            Dict: [{ value: 0, label: '标准方程' }, { value: 1, label: '自定义方程1' }, { value: 2, label: '自定义方程2' }]
        },
        { key: 'AntennaSize', label: '天线尺寸', allowClear: true, type: 'Number', unit: 'm' },
        {
            key: 'BeamWidth', label: '波束宽度', allowClear: true, type: 'Number', unit: 'm',
            Event: {
                // 监听事件，改变当前值,一个字段对应一组监听程序
                // Wacth: 'antennaType',
                // 显示隐藏事件（此项不编写时，默认为展示状态）
                Enable: 'antennaType == "round" || antennaType == "oval"',
            }
        },
        {
            key: 'MaximumGain', label: '最大增益', allowClear: true, type: 'Number', unit: 'dBi',
            Event: {
                // 监听事件，改变当前值,一个字段对应一组监听程序
                // Wacth: 'antennaType',
                // 显示隐藏事件（此项不编写时，默认为展示状态）
                Enable: 'antennaType == "round" || antennaType == "oval"',
            }
        },
        {
            key: 'ApplicableType', label: '适用类型', allowClear: true, type: 'Select', default: 0,
            Dict: [{ value: 0, label: '标准方程' }, { value: 1, label: '自定义方程1' }, { value: 2, label: '自定义方程2' }]
        },
        {
            key: 'Frequency', label: '频率范围', type: 'DoubleNumberInline', unit: 'MHz',
            MultiKeyDefault: [
                { FormKey: 'Star', ValueKey: 'Star', default: null, },
                { FormKey: 'End', ValueKey: 'End', default: null, },
            ],
        },
        {
            key: 'SRtype', isbyte: true, label: '收发类型', type: 'CheckBoxGroup', default: 0,
            Dict: [{ code: 1, title: '发射' }, { code: 2, title: '接收' }],
            DictOption: { labelKey: 'title', valueKey: 'code' },
        },
        { key: 'describe', label: '描述', type: 'String' },
    ],
    view: {
        type: 'Layout.FormLayout',
        options: { labelCol: { style: { width: '80px' } } },
        slots: {
            default: [{
                type: 'Layout.FormGroup', options: {}, slots: {
                    default: [
                        'antennaType',
                        'Nothing:SolidLine',
                        {
                            type: 'Layout.RowGroup', options: { ColArray: [8, 8, 8, 4, 4], RowGutter: 32 }, slots: {
                                Col_0: ['equationType'],
                                Col_1: ['equationName'],
                                Col_2: ['equationFormula'],
                                Col_4: ['NoLabelWidth:EditAntennaEquation'],
                            }
                        },
                        'Nothing:DasheLine',
                        {
                            type: 'Layout.RowGroup', options: { ColArray: [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8], RowGutter: 32 }, slots: {
                                Col_0: ['AntennaModel'],
                                Col_1: ['Manufacturer'],
                                Col_2: ['AntennaSize'],
                                Col_3: ['BeamWidth'],
                                Col_4: ['MaximumGain'],
                                Col_5: ['ApplicableType'],
                                Col_6: ['Frequency'],
                                Col_7: ['SRtype'],
                            }
                        },
                        {
                            type: 'Layout.RowGroup', options: { ColArray: [16, 4, 4], RowGutter: 32 }, slots: {
                                Col_0: ['describe'],
                            }
                        },
                    ]
                }
            }]
        }
    },

    // view: {
    //     type: 'Layout.TestLayout',
    //     options: { labelCol: { style: { width: '100px' } } },
    //     slots: {
    //         default: [{
    //             type: 'Layout.FormGroup', options: { title: '地理信息', }, slots: { default: ['name', 'state', 'position'] }
    //         }],
    //     },
    // },
}

